package com.zx.mobile.service.proxy;

import com.zx.mobile.domain.AcctInfoRequest;
import com.zx.mobile.domain.AcctInfoResponse;
import org.apache.commons.lang3.StringUtils;

public class AcctInfoCommonProxy {

    /**
     * 账户信息合法性校验
     *
     * @return
     */
    public static String checkAcctInfo(AcctInfoRequest acctInfoRequest) {
        if (StringUtils.isNotBlank(acctInfoRequest.getPlatformType())) {
            if (!("A".equals(acctInfoRequest.getPlatformType()) || "iPhone"
                    .equals(acctInfoRequest.getPlatformType()))) {
                return "平台类型不合法";
            }
        } else {
            return "输入项必填";
        }
        if (StringUtils.isBlank(acctInfoRequest.getAppUserId())) {
            return "输入项必填";
        }

        return null;
    }

    /**
     * 账户信息信息
     *
     * @param acctInfoRequest
     * @return
     */
    public static AcctInfoResponse getShareProfitResponse(
            AcctInfoRequest acctInfoRequest) {
        AcctInfoResponse acctInfoResponse = new AcctInfoResponse();
        acctInfoResponse.setReturnCode("0000");
        acctInfoResponse.setReturnMsg("账户信息获取成功");
        return acctInfoResponse;
    }
}
